<!DOCTYPE HTML>
<html>
    <head>
        <title>ms-if</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
        <script src="../avalon.js" ></script>
        <style>
            .active{
                background: blueviolet;
            }
        </style>
        <script>
            avalon.define('xxx', function(vm) {
                vm.data = {
                    toggle: true
                }
                vm.toggle = function() {
                    vm.data.toggle = !vm.data.toggle
                }
            });

        </script>
    </head>
    <body>
        <div class="avalonHide">测试avalonHide</div>
        <div ms-controller="xxx">
            <div ms-if="data.toggle" class="active">能动态添加移除</div>{{data.toggle}}
            <p><button type='button' ms-click='toggle'>点我</button></p>
        </div>
    </body>
</html>
